<template lang="pug">
	.get-health-card-wrap
		.health-card-tip
			.top-tip 领取电子健康卡须知
			p 1.电子健康卡为国家卫生健康委员会建设发展需要，就诊前需办理居民健康卡；
			p 2. 领取电子健康卡后可实现网上挂号、在线缴费、就诊签到、报告查询等就医服务，为就诊人提高就诊效率，减少排队次数；
			p 3. 电子健康卡采用实名制，一人一卡，全市各医疗机构通用；
			p 4. 请凭当前就诊人的有效身份证件领取，以免造成就诊信息错误；
			p 5. 新生儿（无身份证号码）可以通过出生信息领取。
		.health-button(@click="goCard('idNumber')")
			main-button(text="通过身份证号码领取" isActive="true")
		.health-button(@click="goCard('certificate')")
			main-button(text="新生儿领取" isActive="true" isWhite="true")
</template>

<script>
import mainButton from '@/components/main-button'
export default {
	name: 'getHealthCard',
	data() {
		return {}
	},
	created() {},
	mounted() {},
	methods: {
		goCard(flag) {
			let that = this
			let isReadFamily = this.$route.query.isReadFamily
			if (flag === 'idNumber') {
				this.$router.push({
					path: '/views/healthCard/insertId',
					query: {
						isNormalget: '1'
					}
				})
			}

			if (flag === 'certificate') {
				if (isReadFamily) {
					//本人没有领卡时,需本人先领卡
					this.wx.showModal({
						title: '电子健康卡',
						content: '请先领取您本人的电子健康卡',
						confirmText: '立即领取',
						success(res) {
							if (res.confirm) {
								that.$router.push({
									path: '/views/healthCard/insertId',
									query: {
										isReadFamily: '1', //需要先读取本人信息
										isNormalget: '1'
									}
								})
							}
						}
					})
				} else {
					this.$router.push({
						path: '/views/healthCard/getWithoutId'
					})
				}
			}
		}
	},
	components: {
		mainButton
	}
}
</script>

<style lang="stylus">
	.get-health-card-wrap
		.health-card-tip
			height 100%
			background-color white
			padding mainPadding
			margin-bottom 60px
			.top-tip
				color grayFontColor88
				font-size 28px
				padding 10px 0 40px
			p
				color blackFontColor1A
				font-size 30px
				margin-bottom mainMargin
		.health-button
			width 690px
			height 92px
			border-radius 46px
			overflow hidden
			margin 0 auto mainMargin
</style>
